mob
	asteroids
		name = "Asteroid"
		icon = 'graphics/asteroids.dmi'
		pixel_step = 1
		width = 32
		height = 32
		density = 1

		var
			horizontal = 0
			vertical = 0

		/*
		// Spawn
		*/
		New(e_turn = 0,speedup = 0)
			icon_state = "[rand(0,10)]"
			if(e_turn > 0) icon = turn(icon,rand(0,360)-120)

			loc = locate(24,rand(1,10),1)
			horizontal = rand(2,4)
			vertical = rand(-5,5)
			if(speedup > 0) horizontal *= 2 * speedup
			..()

		/*
		// horizontalment
		*/

		Loop()
			..()
			if(horizontal > 0)
				var/X = absx - horizontal
				var/Y = absy + vertical

				if(Y < 2)
					Y = (world.maxy * 32) - 1

				if(Y > (world.maxy * 32) - 1)
					Y = 2

				if(X > 1)
					PixMove(X,Y)
				else
					del(src)

		/*
		// Hit
		*/
		PixBump(atom/A, BumpDir)
			if(istype(A, /mob/player))
				var/mob/player/M = A
				M.hit()
				del(src)
				return 1
